# -*- coding: utf-8 -*-
# @Time    : 2020/8/17 16:36
# @Author  : xiao

#真机=True
import time

from basic.data import global_var

isrealDevice=True


def getIsrealDevice():
    return isrealDevice;


def getTime(index):
    t = time.time()
    if index==1:
        return int(t) #秒级时间戳
    elif index==2:
        return int(round(t * 1000)) #毫秒级时间戳
    elif index==3:
        return int(round(t * 1000000)) #微秒级时间戳
    else:
        return t #原始时间数据


def app_name(name):
    if "agx" in name or "AGX" in name:
        global_var.set_value('app_name', "cn.cloudbae.loveguangxi")
    elif "ann" in name or "ANN" in name:
        global_var.set_value('app_name', "com.cloudbae.lovenanning")
    elif "awz" in name or "AWZ" in name:
        global_var.set_value('app_name',"cn.cloudbae.lovewuzhou")
    else:
        global_var.set_value('app_name', "com.cloudbae.lovenanning")